package com.antonio081014.arielclock;

import java.sql.Time;
import java.util.ArrayList;
import java.util.Calendar;

/**
 * @author antonio081014
 * 
 */

public class Alarm {

	// If this clock is enabled;
	private boolean enabled;
	final static int NUMBER_OF_DAYS = 7;
	// Time for the clock;
	private Time time;
	// If it's repeated;
	private boolean repeated;
	// You could not use boolean instead here.
	// It also shows the repeat setting for the clock from the week view;
	private ArrayList<Boolean> repeatlist;

	public Alarm() {
		Calendar c = Calendar.getInstance();
		this.time = new Time(c.getTime().getHours(), c.getTime().getMinutes(),
				0);
		this.repeatlist = generateAvailabilityOfWeek();
		this.repeated = false;
	}

	public Alarm(Time t, boolean rep, ArrayList<Boolean> replist) {
		this.time = t;
		this.repeated = rep;
		this.repeatlist = replist;
	}

	private ArrayList<Boolean> generateAvailabilityOfWeek() {
		ArrayList<Boolean> list = new ArrayList<Boolean>();
		for (int i = 0; i < NUMBER_OF_DAYS; i++)
			list.add(false);
		return list;
	}

	public boolean isEnabled() {
		return enabled;
	}

	public void setEnabled(boolean enabled) {
		this.enabled = enabled;
	}

	public Time getTime() {
		return time;
	}

	public void setTime(Time time) {
		this.time = time;
	}

	public boolean isRepeated() {
		return repeated;
	}

	public void setRepeated(boolean repeated) {
		this.repeated = repeated;
	}

	public ArrayList<Boolean> getRepeatlist() {
		return repeatlist;
	}

	public void setRepeatlist(ArrayList<Boolean> repeatlist) {
		this.repeatlist = repeatlist;
	}
}
